from django.urls import path, include
from rest_framework.routers import DefaultRouter

from ephm_api import views

router = DefaultRouter()

urlpatterns = [
    path("warning_api/", views.ephm_warning_viewset.as_view(), name="获取warning表上下限值"),
    path("data_hour_api/", views.data_hour_viewset.as_view(), name="获取data_hour表中不同测点数据"),
    path("oil_level_api/", views.oil_level_viewset.as_view(), name="获取oil_level表液位数据"),
    # path("cb2op201_api/",views.cb2op201_viewset.as_view(), name = "cb2op201_api"), # 已并入cnc_api
    path("get_station_api/", views.get_station_info_viewset.as_view(), name="根据传入的api值，分别获取data_hour表，oil_level表，warning表的工位号列表数据"),
    path("cnc_api/", views.cnc_viewset.as_view(), name="根据machine设备名称获取对应的cnc表中的加工数据"),
    path("get_tool_nc_api/", views.get_tool_nc_viewset.as_view(), name="根据传入的machine设备名称获取对应的cnc表中的刀具号和CNC程序列表并去重"),
    path("get_op_info_data/", views.opInfoData.as_view(), name="获取工位选项列表时间"),
    path("get_ActionTimeClassListInfo_data/", views.classListInfoData.as_view(), name="获取不同监控的选项列表数据"),
    path("get_ClassListInfo_data/", views.classListInfoData.as_view(), name="获取不同监控的选项列表数据"),
    path("get_powertrain_OpInfo_data/", views.PowertrainOpInfoData.as_view(), name="获取动力总成工位信息列表数据"),
    path("get_PowertrainProjNameData/", views.PowertrainProjNameData.as_view(), name="获取动力总成车间录入项目信息数据"),
    path("get_measurement_point_ledger_data/", views.PowertrainMeasurementPointLedger.as_view(), name="获取测点台账数据"),
    path("get_push_records_data/", views.PowertrainPushRecords.as_view(), name="获取测点台账推送记录数据"),
    path("get_push_records_data_count/", views.PowertrainPushRecordsCount.as_view(), name="获取测点台账推送记录数据计数数据"),
    path("update_measurement_point_limit/", views.PowertrainMeasurementPointLimitUpdate.as_view(), name="更新测量点台账数据表上下限数据"),
    path("PowerEphmManuEnterData/", views.PowerEphmManuEnterDataPost.as_view(), name="获取动力总成车间录入项目信息"),
    path("get_PowerEphmManuEnterData/", views.PowerEphmManuEnterDataMainAxis.as_view(), name="获取动力总成车间录入项目信息(用于基础数据展示CNC主轴数据)"),
    path("get_qdas_feature_data/", views.PowertrainQdasFeatureQuery.as_view(), name="获取qdas特征数据"),
    path("get_post_patch_delete_EphmLimits_data/", views.EphmLimitsView.as_view(), name="用于获取测点项数据的增删改查"),
    path("gppd_EphmLimitsWarning_data/", views.EphmLimitsWarningView.as_view(), name="用于报警日志增删改查get和post和patch和delete"),
    path("redis_tolerance_cache/", views.ToleranceCacheView.as_view(), name="redis公差缓存清除和更新"),
    path("delete_all_EphmLimitsWarning_data/", views.EphmLimitsWarningDeleteAllView.as_view(), name="用于批量删除所有报警日志，谨慎调用"),
    path("get_qdas_status/", views.AllStationStatusView.as_view(), name="qdas-status-all"),
    path("get_qdas_status/<str:zone>/<str:op>/", views.StationStatusView.as_view(), name="qdas-status-op"),
    path("get_qdas_status_by_feature/<int:feature_id>/", views.FeatureStatusView.as_view(), name="qdas-status-feature"),
]
